#include <QGuiApplication>
#include <QQuickView>
#include <QQmlContext>
#include <cachesetter.h>
#include <QDir>
#include "mytool.h"

int main(int argc, char *argv[])
{
    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

    QGuiApplication app(argc, argv);
    QDir::setCurrent(app.applicationDirPath());

    QQuickView view;
    MyTool tool;

    qmlRegisterType<CacheSetter>("CacheSetter", 1, 0, "CacheSetter");
    view.rootContext()->setContextProperty("Mytool", &tool);

    view.setSource(QUrl(QStringLiteral("qrc:/main.qml")));

    view.show();

    return app.exec();
}
